package com.imooc.alllearning.service;

import com.imooc.alllearning.common.PageQuery;
import com.imooc.alllearning.common.PageResult;
import com.imooc.alllearning.domain.dto.UserDTO;
import com.imooc.alllearning.domain.dto.UserQueryDTO;
import com.imooc.alllearning.domain.entity.UserDO;

import java.util.List;

/**
 * 用户服务接口
 * Created by lijian on 2020/3/27 16:03
 */
public interface UserService {
    /**
     * 新增
     * @param userDTO
     * @return
     */
    int save(UserDTO userDTO);

    /**
     * 更新
     * @param id
     * @param userDTO
     * @return
     */
    int update(Long id, UserDTO userDTO);

    /**
     * 删除
     * @param id
     * @return
     */
    int delete(Long id);

    /**
     * 查询
     * @return
     */
    PageResult<List<UserDTO>> query(PageQuery<UserQueryDTO> pageQuery);
}
